/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package course.ya.doc.from.code.model.statements;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author smiling_devilll
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name="statements")
@DiscriminatorColumn(name="statement_type")
public abstract class AStatement implements Serializable {
    
    private static final long serialVersionUID = -3195422993288652611L;
    
    @Id
    @Column(name="statement_id")
    @SequenceGenerator(sequenceName = "global_seq", name = "global_seq")
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private long id;
    
    @Column(name="external_id")
    private int statementId;
    
    @Column(name="statement_comment")
    protected String comment;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getStatementId() {
        return statementId;
    }

    public void setStatementId(int statementId) {
        this.statementId = statementId;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

}
